package com.py.custom.ability.threadpool;

import com.py.custom.ability.threadpool.metric.PoolConfig;

import java.util.concurrent.*;

/**
 * description：
 */
public class NamedThreadPoolExecutor extends ThreadPoolExecutor {

    public NamedThreadPoolExecutor(PoolConfig config) {
        this(config.getCorePoolSize(), config.getMaximumPoolSize(), config.getKeepAliveTime(), config.getUnit(),
                config.getWorkQueue(), config.getThreadFactory(), config.getHandler());
    }

    public NamedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit,
                                   BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory,
                                   RejectedExecutionHandler handler) {
        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler);
    }
}
